<?php
// var_dump( $_COOKIE['user']  );
if ( empty( $_COOKIE['user'] ) ){
		header("LOCATION:http://yandudu.com/login.php");

}
?>

<style>
		/*#td1 a:link {color: blue}
		#td1 a:visited {color: blue}
		#td1 a:hover {color: blue}
		#td1 a:active {color: blue}*/
</style>
<?php
require'./main_1.php';
include("top.php");
if(isset($_GET['id'])){
			$id=$_GET['id'];
		}else{
			$id="首页";
		}
?>

<table width="1300" height="23" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <!-- <td width="100%" background="images/dh_back.gif">
				<div align="center">
					&nbsp;
					<a href="index.php?id=<?php echo '首页';?>" class="a1">

					</a>
				</div>
	</td> -->
    <!-- <td width="100%" background="images/dh_back.gif">
				<div align="center">&nbsp;&nbsp;
						<a href="index.php?id=<?php echo '';?>" class="a1">

						</a>
				</div>
	</td> -->
		<!-- <td width="100%" background="images/dh_back.gif">
				<div align="center">&nbsp;&nbsp;
						<a href="index.php?id=<?php echo '';?>" class="a1">

						</a>
				</div>
		</td> -->
  </tr>
</table>
<table width="1300" style="padding-bottom:30px" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="0.5%" height="315" ></td>
    <td width="18%" valign="top"><?php include_once("left.php");?></td>
    <td width="10px" ></td>
    <td align="center"  valign="top">
	      <?php
		switch($id){
			case "首页":
        		include "main.php";
    		break;
				case $id == 'new':
	        		include "today.php";
	    		break;
				case $id == 'safehistory':
	        		include "safehistory.php";
	    		break;

			default:
        		include "main.php";
    	break;
		}
	?>
     </td>
    <td width="0.5%" ></td>
  </tr>
</table>
<?php

// echo empty($_COOKIE['user']) ? '次cookie不存在' : $_COOKIE['user'];
include_once("bottom.php");
?>

<script type="text/javascript">
function codecontent(data){
	// alert(data);
	document.getElementById("yujing1").innerText = data[0];
	document.getElementById("yujing2").innerText = data[1];
	layer.open({
	      type: 1,
	      title: false,
	      closeBtn: 0,
	      shade: 0,
	    //   shade: [1, '#393D49'],
	      shadeClose:true,
	      scrollbar: true,
	      fixed: false,
	      border:0,
	    //   area: ['600px' , '400px'],
		area:'500px',
	      offset: '100px',
	      content: $('#fire_alert') //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
	});
}
function yujing(){
	// alert('ok');
layer.closeAll();
}

function dianji(e){
	var red =	e.style.color = '#14bb9f';
}


</script>
